package com.shihb.behavioralpatterns.observerpattern;/**
 *Description:观察者模式
 *Version:1.0.0
 *@author shihb
 *@date 2020/4/21 11:24
 */
public class Client {

  public static void main(String[] args) {
    WeatherStation weatherStation = new WeatherStation();
    weatherStation.register(new Sina());
    weatherStation.register(new Baidu());
    weatherStation.setData("32","20");
    System.out.println("===更新天气===");
    weatherStation.setData("20","30");

  }
}
